package com.yh.jucTest;

import java.util.List;

/**
 * @ClassName Accumlator
 * @Description TODO
 * @Author 0715-YuHao
 * @Date 2020/12/15 12:37
 */
public class Accumlator implements Runnable {

    private List<Integer> ai;

    Accumlator(List<Integer> ai) {
        this.ai = ai;
    }

    @Override
    public void run() {
        for (int i = 0; i < 1000; i++) {
            ai.set(0, ai.get(0) + 1);
        }
    }
}
